package calc;

/**
 * ICalculator interface provides the basic functions of a calculator.
 * 
 * @author Samuel Santos
 *
 */
public abstract interface ICalculator <T extends Number> {
	
	/**
	 * Adds two number x and y, and returns the sum.
	 * @param x  a number.
	 * @param y  a number.
	 * @return the sum of x and y.
	 */
	public abstract T add(T x, T y) throws ArithmeticException;
	
	/**
	 * Subtract two number x and y, and returns the result of subtracting.
	 * @param x a number.
	 * @param y a number.
	 * @return the subtracting of x and y.
	 */
	public abstract T subtract(T x, T y) throws ArithmeticException;
	
	/**
	 * Multiplies two number x and y, and returns the multiplication result.
	 * @param x a number.
	 * @param y a number.
	 * @return the multiplication of x and y.
	 */
	public abstract T multiply(T x, T y) throws ArithmeticException;
	
	/**
	 * Divides two number x and y and returns the result of the division.
	 * @param x a number.
	 * @param y a number.
	 * @return the division of x and y.
	 */
	public abstract T divide(T  numerator, T denominator)throws ArithmeticException;
	
	
}
